package com.design.pattern.factory.simple;

/**
 * 简单工厂测试类
 */
public class ThirdPartTest {
    //用户获取第三方登录实例
    //public static final String CHANNEL="qq";
    //public static final String CHANNEL="mBlog";
    public static final String CHANNEL = "weChat";

    public static void main(String[] args) {
        //获取第三方登录实例
        ThirdPartLogin thirdPart = ThirdPartFactory.getInstance(CHANNEL);
        //获取第三方用户授权
        thirdPart.getUserAuthorization();
        //获取第三方用户信息
        thirdPart.getUserInfo();
        //保存第三方用户数据
        thirdPart.saveUser();
    }
}
